<include file="public@head" />
</head>

<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>评论管理</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:cmf_plugin_url('DComment://AdminIndex/index')}">
        状态:
        <select class="form-control" name="status" style="width: 80px;">
            <option value='-1'>全部</option>
            <option value="0" <eq name='status' value='0'>selected</eq>>待审核</option>
            <option value="1" <eq name='status' value='1'>selected</eq>>已通过</option>
        </select> &nbsp;&nbsp;
        时间:
        <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
               value="{$start_time|default=''}"
               style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
               value="{$end_time|default=''}"
               style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
        用户:
        <input type="text" class="form-control" name="username" style="width: 120px;"
               value="{$username|default=''}" placeholder="请输入用户名">&nbsp; &nbsp;
        关键字:
        <input type="text" class="form-control" name="keyword" style="width: 120px;"
               value="{$keyword|default=''}" placeholder="请输入关键字...">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:cmf_plugin_url('DComment://AdminIndex/index')}">清空</a>
    </form>

    <form class="js-ajax-form" action="" method="post">
        <div class="table-actions">
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit" data-action="{:cmf_plugin_url('DComment://AdminIndex/pass')}" data-subcheck="true">审核通过
            </button>

            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
                    data-action="{:cmf_plugin_url('DComment://AdminIndex/delall')}" data-subcheck="true" data-msg="您确定删除吗？">
                {:lang('DELETE')}
            </button>
        </div>
    
        <table class="table table-hover table-bordered table-list margin-top-10">
            <thead>
                <tr>
                    <th width="15">
                        <label>
                            <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                        </label>
                    </th>
                    <th width="50">ID</th>
                    <th width="200">文章标题</th>
                    <th width="100">评论用户</th>
                    <th>评论内容</th>
                    <th width="80">状态</th>
                    <th width="150">评论时间</th>
                    <th width="150">操作</th>
                </tr>
            </thead>
            <tbody>
                <foreach name="list" item="vo">
                <php>$url = json_decode(base64_decode($vo['url']),true);</php>
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}" title="ID:{$vo.id}">
                    </td>
                    <td>{$vo.id}</td>
                    <td>{$vo.more}</td>
                    <td >{$vo.full_name}</td>
                    <td><gt name="vo.parent_id" value="0">@{$vo.to_username}&nbsp;<br /></gt>{$vo.content}</td>
                    <td>
                        <eq name="vo.status" value="1">通过<else/>待审核</eq></td>
                    <td>{:date('Y-m-d H:i',$vo['create_time'])}</td>
                    <td>
                        <a target="_blank" href="{:cmf_url($url['action'],array('id'=>$url['param']['id'],'cid'=>$url['param']['cid']))}#comment{$vo.id}">查看</a>
                        <a href="{:cmf_plugin_url('DComment://AdminIndex/reply',array('id'=>$vo.id))}">回复</a>
                        <a href="{:cmf_plugin_url('DComment://AdminIndex/del',array('id'=>$vo.id,'oid'=>$vo.object_id))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                    </td>
                </tr>
                </foreach>
            </tbody>
        </table>
    </form>

    <ul class="pagination">{$page|default=''}</ul>
</div>

<script src="__STATIC__/js/admin.js"></script>

</body>
</html>